<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport"content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<@cms_site id=siteId!'' >
	<@cms_channel id=businessId!'' >
		<meta name="keywords" content="${(site.keywords)!''},${(tag_bean.name)!''}" />
		<title>${(site.name)!''}&nbsp;-&nbsp;${(tag_bean.name)!''}</title>
	</@cms_channel>
	</@cms_site>
	<link rel="stylesheet" href="${ctx}/u/${(siteId)!''}/f/css/phone.css" />
	<link rel="stylesheet" href="${ctx}/u/${(siteId)!''}/f/css/style.css" />
	<link href='${ctx}/u/${(siteId)!''}/f/css/flipping_gallery.css' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all">
	
	<script type="text/javascript" src="${ctx}/u/${(siteId)!''}/f/js/jQuery.1.8.2.min.js" ></script>
	<script type="text/javascript" src="${ctx}/u/${(siteId)!''}/f/js/height.js" ></script>
	<script type="text/javascript" src="${ctx}/u/${(siteId)!''}/f/js/jquery.flipping_gallery.js"></script>
	<script src="${ctx}/layui/lay/dest/layui.all.js"></script>
	
</head>
<body>
	<div class="perinfo_all">
		<div class="perinfo_top">
			<img src="${ctx}/u/${(siteId)!''}/f/images/perinfo_01.jpg" />
		</div>
		<div class="porinfo_tab lin_center">
			<div class="title">完善个人信息</div>
		</div>
		<div class="porinfo_box">
			<div class="porinfo_form boxSizing">
				<ul class="porinfo_list">
				    <li class="lin_left">
				    	<div class="h4">姓名</div>
				    	<input id="name" type="text" class="porenter" name="name" value="" placeholder="">
				    </li>
				    <li class="lin_left">
				    	<div class="h4">电话</div>
				    	<input id="telephone" type="tel" class="porenter" name="tel" value="" placeholder="">
				    </li>
				</ul>
				<button type="submit" class="porinfo_btn" onclick="wanshanxinxi();" >完成</button>
			</div>
		</div>
	</div>
	<div class="theme_mask"></div>
	<div class="theme_win">
		<div class="title boxSizing lin_left">
			<span>成功提醒</span>
		</div>
		<div class="close"><img src="${ctx}/u/${(siteId)!''}/f/images/icon_04.png" /></div>
		<div class="win_main boxSizing">
			<span>个人资料已完善，</span>
			<span>您已成为我们的义工会员哦~~</span>
		</div>
		<div class="login_btn">个人中心</div>
	</div>
	<input type="hidden" id="nextPageBusinessId" value="${nextPageBusinessId!''}">
<script type="text/javascript">
	/** 完善信息 **/
	function wanshanxinxi(){
		var name = $("#name").val();
		name = $.trim(name);
		var telephone = $("#telephone").val();
		telephone = $.trim(telephone);
		if(name == "" || telephone == "" ){
			alert("姓名与手机都不能为空！");
			return;
		}
		$.ajax({
			url: "${ctx}/s/${siteId}/${businessId}/member/ajax/saveorupdate" ,
			data: {
				"name": name , 
				"telephone": telephone
			} , 
			success: function(data){
				if(data.status == "success"){
					layer.msg("保存成功！", {
					  icon: 1,
					  time: 2000 //2秒关闭（如果不配置，默认是3秒）
					}, function(){
						var nextPageBusinessId = $("#nextPageBusinessId").val();
						if(nextPageBusinessId != null && nextPageBusinessId !="" ){
							location.href = "${ctx}/f/mp/${siteId}/" + nextPageBusinessId;
						}else{
							location.href = "${ctx}/f/mp/${siteId}/${pageBusinessId}";
						}
					});
				}else{
					layer.msg(data.message, {
					  icon: 1,
					  time: 2000 //2秒关闭（如果不配置，默认是3秒）
					}, function(){
					});
				}
			}
		});
	}
	
	$(document).ready(function() {
		//floatbox('.porinfo_btn','.close','.theme_win');
	});
	function floatbox(xbtn, sbtn, puw){
		$(xbtn).bind("click",function(event){
			$(".theme_mask").show();
			$(".theme_mask").height($(document).height());
			$(puw).show();
			event.stopPropagation();
			stop();
		})
		$(sbtn).bind("click",function(){
			$(".theme_mask").hide();
			$(puw).hide();
			move();
		})
	}
	//实现滚动条无法滚动
	var mo=function(e){e.preventDefault();};

	/***禁止滑动***/
	function stop(){
	        document.body.style.overflow='hidden';        
	        document.addEventListener("touchmove",mo,false);//禁止页面滑动
	}

	/***取消滑动限制***/
	function move(){
	        document.body.style.overflow='';//出现滚动条
	        document.removeEventListener("touchmove",mo,false);        
	}
</script>
</body>
</html>